package ${model.packageName}.${model.moduleName}.model;

<#if model.supportBaseDO>
import com.young.common.model.BaseDO;
</#if>
<#if model.supportImport || model.supportExport>
import com.young.common.core.excel.ExcelColumn;
</#if>
import java.util.Date;
/**
* ${model.tableRemark!}实体类
* Created by ${model.author!} on ${model.createTime?date}.
*/
public class ${model.className} <#if model.supportBaseDO>extends BaseDO </#if>{

<#--变量-->
<#list model.colList as item>
    <#--判断需不需要生成字段,因为部分字段可能在父类有了-->
    <#if !model.supportBaseDO || !item.baseDOField>
        <#if item.asCondition?? && item.asCondition != "1" && item.fieldType == "Date">
    /**
     * ${item.fieldRemark!item.fieldName}
     */
            <#if model.supportImport || model.supportExport>
    @ExcelColumn(value = "${item.fieldRemark!item.fieldName}", order = ${item_index+1}0)
            </#if>
    private ${item.fieldType} ${item.attrName};
    /**
     * ${item.fieldRemark!item.fieldName},按时间检索时作为结束时间使用
     */
    private ${item.fieldType} ${item.attrName}2;
        <#else>
    /**
     * ${item.fieldRemark!item.fieldName}
     */
            <#if model.supportImport || model.supportExport>
    @ExcelColumn(value = "${item.fieldRemark!item.fieldName}", order = ${item_index+1}0)
            </#if>
    private ${item.fieldType} ${item.attrName};
        </#if>
    </#if>
</#list>

<#--支持BaseDO则不需要生成排序字段-->
<#if !model.supportBaseDO>
    /**
     * 排序字段
     */
    private String orderBy;
    /**
     * 排序类型,升序asc/降序desc
     */
    private String orderType;
</#if>

    <#--无参构造器-->
    public ${model.className}() {
        super();
    }

<#--get/set方法-->
<#list model.colList as item>
    <#--判断需不需要生成字段,因为部分字段可能在父类有了-->
    <#if !model.supportBaseDO || !item.baseDOField>
        <#if item.asCondition?? && item.asCondition != "1" && item.fieldType == "Date">
    public ${item.fieldType} get${item.attrName?cap_first}() {
        return ${item.attrName};
    }
    public void set${item.attrName?cap_first}(${item.fieldType} ${item.attrName}) {
        this.${item.attrName} = ${item.attrName};
    }
    public ${item.fieldType} get${item.attrName?cap_first}2() {
        return ${item.attrName}2;
    }
    public void set${item.attrName?cap_first}2(${item.fieldType} ${item.attrName}2) {
        this.${item.attrName}2 = ${item.attrName}2;
    }

        <#else>
    public ${item.fieldType} get${item.attrName?cap_first}() {
        return ${item.attrName};
    }
    public void set${item.attrName?cap_first}(${item.fieldType} ${item.attrName}) {
        this.${item.attrName} = ${item.attrName};
    }

        </#if>
    </#if>
</#list>

<#--支持BaseDO则不需要生成排序字段-->
<#if !model.supportBaseDO>
    public String getOrderBy() {
        return orderBy;
    }
    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getOrderType() {
        return orderType;
    }
    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }
</#if>

}